import request from "@/utils/request";

// 查询列表
export function masterList(query) {
  return request({
    url: '/labour/staff/salary/masterList',
    method: 'get',
    params: query
  })
}

// 查询明细列表
export function detailList(query) {
  return request({
    url: '/labour/staff/salary/detailList',
    method: 'get',
    params: query
  })
}

// 查询劳务工工资详细
export function getMaster(id) {
  return request({
    url: '/labour/staff/salary/getMaster/' + id,
    method: 'get'
  })
}

// 查询劳务工工资明细详细
export function getDetail(id) {
  return request({
    url: '/labour/staff/salary/getDetail/' + id,
    method: 'get'
  })
}

// 新增主表
export function addMaster(data) {
  return request({
    url: '/labour/staff/salary/addMaster',
    method: 'post',
    data: data
  })
}

// 新增明细
export function addDetail(data) {
  return request({
    url: '/labour/staff/salary/addDetail',
    method: 'post',
    data: data
  })
}

// 修改劳务工管工资
export function updateMaster(data) {
  return request({
    url: '/labour/staff/salary/updateMaster',
    method: 'put',
    data: data
  })
}

// 修改劳务工管工资明细
export function updateDetail(data) {
  return request({
    url: '/labour/staff/salary/updateDetail',
    method: 'put',
    data: data
  })
}

// 删除劳务工工资
export function deleteMaster(id) {
  return request({
    url: '/labour/staff/salary/deleteMaster/' + id,
    method: 'delete'
  })
}

// 删除劳务工工资明细
export function deleteDetail(id) {
  return request({
    url: '/labour/staff/salary/deleteDetail/' + id,
    method: 'delete'
  })
}

// 下载导入模板
export function downloadTemplate() {
  return request({
    url: '/labour/staff/salary/downloadTemplate',
    method: 'get'
  })
}

// 附件列表
export function getAnnexList(query) {
  return request({
    url: '/labour/staff/salary/getAnnexList',
    method: 'get',
    params: query
  })
}

// 删除附件
export function deleteAnnexFile(query) {
  return request({
    url: '/labour/staff/salary/deleteAnnexFile',
    method: 'get',
    params: query
  })
}
